home *** CD-ROM | disk | FTP | other *** search
- pascal extern void SHOWINIT(short iconID, short moveX);
-
- main()
- {
- if (!isoptionkey())
- {
- SHOWINIT(128, -1);
- init(); /* call the init stuff */
- }
- else
- SHOWINIT(129, -1); /* show the not loaded icon */
- };
-
- isoptionkey()
- {
- return(iskeydown(58));
- };
-
-
- /* What JERKS!!!
- the map looks like :
-
- 87654321 FEDCBA9
- for each byte.... HUMMMPH */
-
-
- iskeydown(keycode)
- int keycode;
- {
- /* returns true if the key specified in the map by
- keycode is down false otherwise */
-
- KeyMap thekeys;
- long mask;
- int bank;
- int temp;
-
- GetKeys(&thekeys); /* check what keys are down -- Option is 58 */
-
- bank = keycode / 32; /* get the right bank to use */
- temp = (keycode % 32); /* ok now get the byte .... */
-
- temp = ((temp / 8 ) * 8 ) + ( 7 - (temp % 8));
-
- mask = 1L << ( 31 - temp);
- if (( thekeys.Key[bank] & mask ) == 0 )
- return(0);
- else
- return(1);
- };
-
-
- #define NULL 0
-
- init()
- {
- char **it;
-
- it = (char **)GetResource('Code',1000);
- if (it != NULL)
- {
- HLock(it);
- jump(*it);
- DetachResource(it);
- };
- return(0);
- };
-
- jump(it)
- int (*it)();
- {
- (*it)(); /* init it */
- };
-